package com.baomidou.springboot.controller;

import com.baomidou.mybatisplus.extension.api.ApiController;
import com.baomidou.springboot.entity.EmailDetail;
import com.baomidou.springboot.service.EmailService;
import lombok.extern.slf4j.Slf4j;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


/**
 * 代码生成器，参考源码测试用例：
 * <p>
 * /mybatis-plus/src/test/java/com/baomidou/mybatisplus/test/generator/MysqlGenerator.java
 */
@RestController
@RequestMapping("/user")
@Slf4j
public class EmailController extends ApiController {

    @Autowired
    private EmailService service;

    @RequestMapping("/email")
    public String insert(HttpServletRequest request, EmailDetail emailDetail){
        log.info("开始咯");
       service.insert(emailDetail,request);
        return "success";
    }
}
